package org.lsb.app_back.service;

import org.lsb.app_back.domain.DevUser;
import org.lsb.app_back.mapper.DevUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class DevUserUserService {
    @Autowired
    private DevUserMapper devUserMapper;

    /**
     * 验证开发者用户
     * @param devCode 开发者编码
     * @param password 开发者密码
     * @return 是否验证通过
     */
    public DevUser authenticateDevUser(String devCode, String password) {

        DevUser devUser= devUserMapper.findByDevCodeAndPassword(devCode, password);
        if(  devUser  !=null){
            return devUser;
        }else {
            return null;
        }
    }
}
